<?php

declare(strict_types=1);

namespace app\common\model;

/**
 * 收支明细
 */
class Account extends MicroEngine
{
    // +------------------------------------------------
    // | 模型关联
    // +------------------------------------------------

    /**
     * 一对一相对关联
     * 
     * 收支明细反向关联所属用户
     * 
     * @return \think\model\relation\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id')->removeOption('soft_delete');
    }
}
